var geojsonData = {
    "type": "FeatureCollection",
    "name": "dress",
    "features": [
      {
        "type": "Feature",
        "properties": {
          "id": 4,
          "NUMPOINTS": 0.0
        },
        "geometry": {
          "type": "Polygon",
          "coordinates": [
            [
              [+116.27661216853765, +39.943816759590774],
              [+116.27669464234627, +39.94383761388292],
              [+116.27668232504644, +39.94380191562169],
              [+116.27661329844166, +39.943811597001876],
              [+116.27661216853765, +39.943816759590774]
            ]
          ]
        }
      },
      {
        "type": "Feature",
        "properties": {
          "id": 5,
          "NUMPOINTS": 1.0
        },
        "geometry": {
          "type": "Polygon",
          "coordinates": [
            [
              [+116.27661329844166, +39.943811597001876],
              [+116.27668232504644, +39.94380191562169],
              [+116.2766547033419,+39.943721861649514],
              [+116.27663224895421, +39.94372501101111],
              [+116.27661329844166, +39.943811597001876]
            ]
          ]
        }
      }
    ]
      
  };
  
        L.geoJSON(geojsonData, {
        style: function(features) {
            switch (features.properties.NUMPOINTS) {
                case '1': return {color: "#ff0000"},console.log("66666");
                case '0':   return {color: "#0000ff"};
            }
        }
       }).addTo(map);
       


       L.geoJSON(geojsonData, {
        style: function(feature) {
            let fillColor;
            switch (feature.properties.NUMPOINTS) {
                case 1.0: 
                    fillColor = "#ff0000"; // 红色填充
                    break;
                case 0.0: 
                    fillColor = "#0000ff"; // 蓝色填充
                    break;
                default: 
                    fillColor = "#ffffff"; // 默认白色填充
            }
            return {
                color: fillColor,      // 边框颜色
                fillColor: fillColor,  // 填充颜色
                fillOpacity: 0.5       // 填充不透明度
            };
        }
    }).addTo(map);
    



    L.geoJSON(geojsonData, {
      style: function(feature) {
          let fillColor;
          switch (feature.properties.NUMPOINTS) {
              case 11.0:
                  fillColor = "#d7191c"; // 红色填充
                  break;
              case 10.0:
                  fillColor = "#e54f35";
                  break;
              case 9.0:
                  fillColor = "#f3854e";
                  break;
              case 8.0:
                  fillColor = "#fdb56a";
                  break;
              case 7.0:
                  fillColor = "#fed38c";
                  break;
              case 6.0:
                  fillColor = "#fff0af";
                  break;
              case 5.0:
                  fillColor = "#eff8b0"; // 红色填充
                  break;
              case 4.0:
                  fillColor = "#ceea91"; // 红色填充
                  break;
              case 3.0:
                  fillColor = "#aedc72"; // 红色填充
                  break;
              case 2.0:
                  fillColor = "#80c75f"; // 红色填充
                  break;
              case 1.0:
                  fillColor = "#4dae50"; // 红色填充
                  break;
              case 0.0:
                  fillColor = "#1a9641"; // 蓝色填充
                  break;
              default:
                  fillColor = "#ffffff"; // 默认白色填充
          }
          return {
              color: fillColor,      // 边框颜色
              fillColor: fillColor,  // 填充颜色
              fillOpacity: 1       // 填充不透明度
          };
      }
  }).addTo(map);